home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
FROMUTS
/
UNIXLIB37B
/
src
/
c
/
getlogin
< prev
next >
Wrap
Text File
|
1990-09-28
|
470b
|
30 lines
#ifdef __STDC__
static char sccs_id[] = "@(#) getlogin.c 1.0 "__DATE__" HJR";
#else
static char sccs_id[] = "@(#) getlogin.c 1.0 26/9/90 HJR";
#endif
/* getlogin.c (c) Copyright 1990 H.Rogers */
#include "pwd.h"
#ifdef __STDC__
extern int getuid(void);
#else
extern int getuid();
#endif
/* getlogin() */
#ifdef __STDC__
char *getlogin(void)
#else
char *getlogin()
#endif
{
register struct passwd *p;
if (!(p = getpwuid(getuid()))) return(0);
return(p->pw_name);
}